<?php echo $this->fetch('header.html'); ?>
<script type="text/javascript">
    $(function () {
        $('#job_form').validate({
            errorPlacement: function (error, element) {
                $(element).next('.field_notice').hide();
                $(element).after(error);
            },
            success: function (label) {
                label.addClass('right').text('OK!');
            },
            onkeyup: false,
            rules: {
                position: {
                    required: true
                },
                sort_order: {
                    number: true
                }
            },
            messages: {
                position: {
                    required: '招聘职位不能为空'
                },
                sort_order: {
                    number: '只能为数字'
                }
            }
        });
    });
</script>
<?php echo $this->_var['build_editor']; ?>
<div id="rightTop">
    <p>招贤纳士</p>
    <ul class="subnav">
        <li><a class="btn1" href="index.php?app=job">管理</a></li>
        <?php if ($this->_var['job']['job_id']): ?>
        <li><a class="btn1" href="index.php?app=job&amp;act=add">新增</a></li>
        <?php else: ?>
        <li><span>新增</span></li>
        <?php endif; ?>
    </ul>
</div>

<div class="info">
    <form method="post" enctype="multipart/form-data" id="job_form">
        <table class="infoTable">
            <tr>
                <th class="paddingT15">
                    招聘职位:</th>
                <td class="paddingT15 wordSpacing5">
                    <input class="infoTableInput2" id="position" type="text" name="position" value="<?php echo htmlspecialchars($this->_var['job']['position']); ?>" />
                </td>
            </tr>
            <tr>
                <th class="paddingT15">
                    招聘人数:</th>
                <td class="paddingT15 wordSpacing5">
                    <input class="infoTableInput2" id="count" type="text" name="count" value="<?php echo htmlspecialchars($this->_var['job']['count']); ?>" />
                    <label class="field_notice">留空为不限</label>
                </td>
            </tr>
            <tr>
                <th class="paddingT15">
                    工作地点:</th>
                <td class="paddingT15 wordSpacing5">
                    <input class="infoTableInput2" id="place" type="text" name="place" value="<?php echo htmlspecialchars($this->_var['job']['place']); ?>" />
                </td>
            </tr>
            <tr>
                <th class="paddingT15">
                    工资待遇:</th>
                <td class="paddingT15 wordSpacing5">
                    <input class="infoTableInput2" id="deal" type="text" name="deal" value="<?php echo htmlspecialchars($this->_var['job']['deal']); ?>" />
                </td>
            </tr>
            <tr>
                <th class="paddingT15">
                    排序:</th>
                <td class="paddingT15 wordSpacing5">
                    <input class="sort_order" id="sort_order" type="text" name="sort_order" value="<?php echo $this->_var['job']['sort_order']; ?>" />
                    <label class="field_notice">更新排序</label>
                </td>
            </tr>
            <tr>
                <th class="paddingT15">
                    <label for="article">详细内容:</label></th>
                <td class="paddingT15 wordSpacing5">
                    <textarea name="content" id="content" style="width:650px;height:400px;"><?php echo htmlspecialchars($this->_var['job']['content']); ?></textarea>
                </td>
            </tr>
            <tr>
                <th></th>
                <td class="ptb20">
                    <input class="formbtn" type="submit" name="Submit" value="提交" />
                    <input class="formbtn" type="reset" name="Submit2" value="重置" />
                </td>
            </tr>
        </table>
    </form>
</div>
<?php echo $this->fetch('footer.html'); ?>
